/**
 * Copyright (C) 2008 - Giant Flying Saucer
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */

package Message;


public class ActionCommand
{
//	public static final int LOGIN_NO_PASSWORD = 1;
//	public static final int QUIT = 2;
	
//	public static final int SESSION_TIMED_OUT = 3;
//	public static final int KICK = 4;

//	public static final int GET_USER_COUNT = 5;
//	public static final int USER_LIST = 6;
//	public static final int ROOM_LIST = 7;
//
//	public static final int CREATE_ROOM = 8;
//	public static final int CREATE_PRIVATE_ROOM = 9;
//	public static final int JOIN_ROOM = 10;
//	public static final int LEAVE_ROOM = 11;
	
//	public static final int DISABLE_ACCOUNT = 12;
//	public static final int ENABLE_ACCOUNT = 13;
//	public static final int CREATE_ACCOUNT = 14;
//	public static final int DELETE_ACCOUNT = 15;
//	public static final int CHECK_IF_ACCOUNT_DISABLED = 16;
//	public static final int CHANGE_PASSWORD = 17;
//	public static final int GET_ALL_DB_USERNAMES = 18;
//	public static final int GET_USER_LAST_LOGIN_DATE = 19;
//	public static final int GET_ALL_USER_PROPERTY_NAMES = 20;
//    public static final int GET_ALL_GLOBAL_PROPERTY_NAMES = 21;
	
//	public static final int SYSTEM_BROADCAST = 22;
//	public static final int BROADCAST_ROOM = 23;
//	public static final int BROADCAST_GAME = 24;
//	public static final int BROADCAST_USER_JOINED_ROOM = 25;
//	public static final int BROADCAST_USER_LEFT_ROOM = 26;
//	public static final int BROADCAST_PRIVATE_MESSAGE = 27;
//	public static final int BROADCAST_USER_DISCONNECTED = 28;
	
//	public static final int INSERT_PROPERTY = 29;
//	public static final int UPDATE_PROPERTY = 30;
//	public static final int DELETE_PROPERTY = 31;
//	public static final int READ_PROPERTY = 32;
//	public static final int INSERT_GLOBAL_PROPERTY = 33;
//	public static final int UPDATE_GLOBAL_PROPERTY = 34;
//	public static final int DELETE_GLOBAL_PROPERTY = 35;
//	public static final int READ_GLOBAL_PROPERTY = 36;
//	public static final int INSERT_SESSION_PROPERTY = 37;
//	public static final int READ_SESSION_PROPERTY = 38;
//	public static final int UPDATE_SESSION_PROPERTY = 39;
//
//	public static final int UPDATE_SERVER_PROPERTY = 40;
//	public static final int READ_SERVER_PROPERTY = 41;
	
//	public static final int UNBLOCK = 42;
//	public static final int BLOCK = 43;
//
//	public static final int SHUTDOWN_SERVER = 44;
//	public static final int SERVER_VERSION = 45;
//	public static final int FORGOT_ADMIN_PASSWORD = 46;
//    public static final int GET_USERS_IP = 47;

	
	private final int num;
	

	private ActionCommand(int num)
	{
		this.num = num;
	}

	public int toInt()
	{
		return num;
	}

//	public static ActionCommand valueOf(String s)
//	{
//		s = s.toUpperCase();
//		if ("LOGIN".equals(s))
//		{
//			return new ActionCommand(LOGIN);
//		}
//		if ("QUIT".equals(s))
//		{
//			return new ActionCommand(QUIT);
//		}
//		if ("SYSTEM_BROADCAST".equals(s))
//		{
//			return new ActionCommand(SYSTEM_BROADCAST);
//		}
//		if ("BROADCAST_ROOM".equals(s))
//		{
//			return new ActionCommand(BROADCAST_ROOM);
//		}
//		if ("SESSION_TIMED_OUT".equals(s))
//		{
//			return new ActionCommand(SESSION_TIMED_OUT);
//		}
//		if ("GET_USER_COUNT".equals(s))
//		{
//			return new ActionCommand(GET_USER_COUNT);
//		}
//		if ("CREATE_ROOM".equals(s))
//		{
//			return new ActionCommand(CREATE_ROOM);
//		}
//		if ("JOIN_ROOM".equals(s))
//		{
//			return new ActionCommand(JOIN_ROOM);
//		}
//		if ("LEAVE_ROOM".equals(s))
//		{
//			return new ActionCommand(LEAVE_ROOM);
//		}
//		if ("DISABLE_ACCOUNT".equals(s))
//		{
//			return new ActionCommand(DISABLE_ACCOUNT);
//		}
//		if ("ENABLE_ACCOUNT".equals(s))
//		{
//			return new ActionCommand(ENABLE_ACCOUNT);
//		}
//		if ("CREATE_ACCOUNT".equals(s))
//		{
//			return new ActionCommand(CREATE_ACCOUNT);
//		}
//		if ("DELETE_ACCOUNT".equals(s))
//		{
//			return new ActionCommand(DELETE_ACCOUNT);
//		}
//		if ("GET_ALL_DB_USERNAMES".equals(s))
//		{
//			return new ActionCommand(GET_ALL_DB_USERNAMES);
//		}
//		if ("GET_ALL_USER_PROPERTY_NAMES".equals(s))
//		{
//			return new ActionCommand(GET_ALL_USER_PROPERTY_NAMES);
//		}
//		if ("GET_ALL_GLOBAL_PROPERTY_NAMES".equals(s))
//		{
//			return new ActionCommand(GET_ALL_GLOBAL_PROPERTY_NAMES);
//		}
//		if ("KICK".equals(s))
//		{
//			return new ActionCommand(KICK);
//		}
//		if ("LOGIN_NO_PASSWORD".equals(s))
//		{
//			return new ActionCommand(LOGIN_NO_PASSWORD);
//		}
//		if ("BROADCAST_PRIVATE_MESSAGE".equals(s))
//		{
//			return new ActionCommand(BROADCAST_PRIVATE_MESSAGE);
//		}
//		if ("CREATE_PRIVATE_ROOM".equals(s))
//		{
//			return new ActionCommand(CREATE_PRIVATE_ROOM);
//		}
//		if ("BROADCAST_USER_JOINED_ROOM".equals(s))
//		{
//			return new ActionCommand(BROADCAST_USER_JOINED_ROOM);
//		}
//		if ("BROADCAST_USER_LEFT_ROOM".equals(s))
//		{
//			return new ActionCommand(BROADCAST_USER_LEFT_ROOM);
//		}
//		if ("USER_LIST".equals(s))
//		{
//			return new ActionCommand(USER_LIST);
//		}
//		if ("ROOM_LIST".equals(s))
//		{
//			return new ActionCommand(ROOM_LIST);
//		}
//		if ("INSERT_PROPERTY".equals(s))
//		{
//			return new ActionCommand(INSERT_PROPERTY);
//		}
//		if ("UPDATE_PROPERTY".equals(s))
//		{
//			return new ActionCommand(UPDATE_PROPERTY);
//		}
//		if ("DELETE_PROPERTY".equals(s))
//		{
//			return new ActionCommand(DELETE_PROPERTY);
//		}
//		if ("READ_PROPERTY".equals(s))
//		{
//			return new ActionCommand(READ_PROPERTY);
//		}
//		if ("INSERT_GLOBAL_PROPERTY".equals(s))
//		{
//			return new ActionCommand(INSERT_GLOBAL_PROPERTY);
//		}
//		if ("UPDATE_GLOBAL_PROPERTY".equals(s))
//		{
//			return new ActionCommand(UPDATE_GLOBAL_PROPERTY);
//		}
//		if ("DELETE_GLOBAL_PROPERTY".equals(s))
//		{
//			return new ActionCommand(DELETE_GLOBAL_PROPERTY);
//		}
//		if ("READ_GLOBAL_PROPERTY".equals(s))
//		{
//			return new ActionCommand(READ_GLOBAL_PROPERTY);
//		}
//		if ("BROADCAST_GAME".equals(s))
//		{
//			return new ActionCommand(BROADCAST_GAME);
//		}
//		if ("SHUTDOWN_SERVER".equals(s))
//		{
//			return new ActionCommand(SHUTDOWN_SERVER);
//		}
//		if ("INSERT_SESSION_PROPERTY".equals(s))
//		{
//			return new ActionCommand(INSERT_SESSION_PROPERTY);
//		}
//		if ("READ_SESSION_PROPERTY".equals(s))
//		{
//			return new ActionCommand(READ_SESSION_PROPERTY);
//		}
//		if ("BLOCK".equals(s))
//		{
//			return new ActionCommand(BLOCK);
//		}
//		if ("UNBLOCK".equals(s))
//		{
//			return new ActionCommand(UNBLOCK);
//		}
//		if ("GET_USER_LAST_LOGIN_DATE".equals(s))
//		{
//			return new ActionCommand(GET_USER_LAST_LOGIN_DATE);
//		}
//		if ("CHANGE_PASSWORD".equals(s))
//		{
//			return new ActionCommand(CHANGE_PASSWORD);
//		}
//		if ("CHECK_IF_ACCOUNT_DISABLED".equals(s))
//		{
//			return new ActionCommand(CHECK_IF_ACCOUNT_DISABLED);
//		}
//		if ("UPDATE_SERVER_PROPERTY".equals(s))
//		{
//			return new ActionCommand(UPDATE_SERVER_PROPERTY);
//		}
//		if ("READ_SERVER_PROPERTY".equals(s))
//		{
//			return new ActionCommand(READ_SERVER_PROPERTY);
//		}
//		if ("SERVER_VERSION".equals(s))
//		{
//			return new ActionCommand(SERVER_VERSION);
//		}
//		if ("FORGOT_ADMIN_PASSWORD".equals(s))
//		{
//			return new ActionCommand(FORGOT_ADMIN_PASSWORD);
//		}
//		if ("UPDATE_SESSION_PROPERTY".equals(s))
//		{
//			return new ActionCommand(UPDATE_SESSION_PROPERTY);
//		}
//		if ("GET_USERS_IP".equals(s))
//		{
//			return new ActionCommand(GET_USERS_IP);
//		}
//
//
//		throw new IllegalArgumentException("Unrecognized command: " + s);
//	}

}